Is there any way to avoid reset of selected objects ...?

Hello,

if I select objects in read-only mode and Switch in shared or exclusive mode the objects aren't selected anymore. Is there any way to avoid deselection?


Anta_st - Wed Sep 09 05:35:32 EDT 2015

Re: Is there any way to avoid reset of selected objects ...?
Mathias Mamsch - Wed Sep 09 10:04:58 EDT 2015

- I suppose with selection you do not refer to the current object but to the seleted objects.

- I also suppose that this is a DXL question, rather then a DOORS client usage question. Otherwise I think there is not much you can do to change this build in behaviour of the client.

In DXL - of course - you can save the selection before switching to edit mode and later restore the selection (using the getSelection() and setSelection() perms). In case of problems with this, post back. You might also be able to define a trigger, which will react to a pre/open and post/open events which should be created when you change the edit mode. You might be able to store the selection on pre/open (in case it is still there) and restore it by DXL on a post/open.

Did not try though.

For what do you need that behaviour? Interactive tool that uses selections and opens the module in edit mode?

Regards, Mathias
 

Re: Is there any way to avoid reset of selected objects ...?
Anta_st - Thu Sep 10 13:34:59 EDT 2015

Mathias Mamsch - Wed Sep 09 10:04:58 EDT 2015

- I suppose with selection you do not refer to the current object but to the seleted objects.

- I also suppose that this is a DXL question, rather then a DOORS client usage question. Otherwise I think there is not much you can do to change this build in behaviour of the client.

In DXL - of course - you can save the selection before switching to edit mode and later restore the selection (using the getSelection() and setSelection() perms). In case of problems with this, post back. You might also be able to define a trigger, which will react to a pre/open and post/open events which should be created when you change the edit mode. You might be able to store the selection on pre/open (in case it is still there) and restore it by DXL on a post/open.

Did not try though.

For what do you need that behaviour? Interactive tool that uses selections and opens the module in edit mode?

Regards, Mathias
 

Hello Matthias,

nice to see you again!

I refer to the one or more selected objects.

Yes, this is DXL question. I am also not the user of DOORS. I found out it works as I've described, but I was not sure if this is any settings matter in DOORS.

Regarding selection -> I thought this way also, but first wanted to check if some easier way is available. Further more I've checked these commands in manual, but the description isn't very good (just my opinion). Do you have any examples of using the commands?

That stuff with the trigger is to high for me. Could you explain in more detail?

Purpose for the request: yes, I need to open the module in edit mode (if it's not) to add some data automatically. Everything is already done. Just the selection has to "remain" between the modes.

Regards,

Re: Is there any way to avoid reset of selected objects ...?
Anta_st - Mon Sep 14 08:22:32 EDT 2015

Anta_st - Thu Sep 10 13:34:59 EDT 2015

Hello Matthias,

nice to see you again!

I refer to the one or more selected objects.

Yes, this is DXL question. I am also not the user of DOORS. I found out it works as I've described, but I was not sure if this is any settings matter in DOORS.

Regarding selection -> I thought this way also, but first wanted to check if some easier way is available. Further more I've checked these commands in manual, but the description isn't very good (just my opinion). Do you have any examples of using the commands?

That stuff with the trigger is to high for me. Could you explain in more detail?

Purpose for the request: yes, I need to open the module in edit mode (if it's not) to add some data automatically. Everything is already done. Just the selection has to "remain" between the modes.

Regards,

Module m = current

Object o, startObj, endObj, oFirst, oFinish
int x = 0
int oLevelstartObj
int oLevelendObj
getSelection(m,startObj, endObj)
 

if (!null startObj) {  //if range has been selected, otherwise do nothing


 while (!null startObj && isSelected startObj) {
  if (x == 0)  { oFirst = startObj
   oLevelstartObj = level(oFirst)
   print oLevelstartObj  "\n" 
  }
            
  x++
 
          
  print identifier(startObj) "\n"
  oFinish = startObj
  oLevelendObj = level(oFinish)
  startObj = next(startObj)

            
 }
       
 print "Total Obj in selection=" x""
     
}

else
       
 {
       
 print "No selection made"
       
 }

m = edit(Name, true, false, true)

while (oLevelstartObj <  oLevelendObj) {
  oFinish = previous(oFinish)
  print identifier(oFinish) "\n"

  oLevelendObj = level(oFinish)
  print oLevelendObj  "\n"
}
setSelection(oFirst, oFinish)